Optimal. Leaf size=130 \[ \frac {\sqrt {c+d x}}{d}+\frac {\sqrt {\pi } \cos \left (2 a-\frac {2 b c}{d}\right ) \text {FresnelC}\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {\pi }}\right )}{2 \sqrt {b} \sqrt {d}}-\frac {\sqrt {\pi } S\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {2 b c}{d}\right )}{2 \sqrt {b} \sqrt {d}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3393, 3387,
3386, 3432, 3385, 3433} \begin {gather*} \frac {\sqrt {\pi } \cos \left (2 a-\frac {2 b c}{d}\right ) \text {FresnelC}\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {\pi } \sqrt {d}}\right )}{2 \sqrt {b} \sqrt {d}}-\frac {\sqrt {\pi } \sin \left (2 a-\frac {2 b c}{d}\right ) S\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {\pi }}\right )}{2 \sqrt {b} \sqrt {d}}+\frac {\sqrt {c+d x}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3385
Rule 3386
Rule 3387
Rule 3393
Rule 3432
Rule 3433
Rubi steps
\begin {align*} \int \frac {\cos ^2(a+b x)}{\sqrt {c+d x}} \, dx &=\int \left (\frac {1}{2 \sqrt {c+d x}}+\frac {\cos (2 a+2 b x)}{2 \sqrt {c+d x}}\right ) \, dx\\ &=\frac {\sqrt {c+d x}}{d}+\frac {1}{2} \int \frac {\cos (2 a+2 b x)}{\sqrt {c+d x}} \, dx\\ &=\frac {\sqrt {c+d x}}{d}+\frac {1}{2} \cos \left (2 a-\frac {2 b c}{d}\right ) \int \frac {\cos \left (\frac {2 b c}{d}+2 b x\right )}{\sqrt {c+d x}} \, dx-\frac {1}{2} \sin \left (2 a-\frac {2 b c}{d}\right ) \int \frac {\sin \left (\frac {2 b c}{d}+2 b x\right )}{\sqrt {c+d x}} \, dx\\ &=\frac {\sqrt {c+d x}}{d}+\frac {\cos \left (2 a-\frac {2 b c}{d}\right ) \text {Subst}\left (\int \cos \left (\frac {2 b x^2}{d}\right ) \, dx,x,\sqrt {c+d x}\right )}{d}-\frac {\sin \left (2 a-\frac {2 b c}{d}\right ) \text {Subst}\left (\int \sin \left (\frac {2 b x^2}{d}\right ) \, dx,x,\sqrt {c+d x}\right )}{d}\\ &=\frac {\sqrt {c+d x}}{d}+\frac {\sqrt {\pi } \cos \left (2 a-\frac {2 b c}{d}\right ) C\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {\pi }}\right )}{2 \sqrt {b} \sqrt {d}}-\frac {\sqrt {\pi } S\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {2 b c}{d}\right )}{2 \sqrt {b} \sqrt {d}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.15, size = 145, normalized size = 1.12 \begin {gather*} \frac {8 \left (\frac {c}{d}+x\right )-\frac {i \sqrt {2} e^{2 i \left (a-\frac {b c}{d}\right )} \sqrt {-\frac {i b (c+d x)}{d}} \text {Gamma}\left (\frac {1}{2},-\frac {2 i b (c+d x)}{d}\right )}{b}+\frac {i \sqrt {2} e^{-2 i \left (a-\frac {b c}{d}\right )} \sqrt {\frac {i b (c+d x)}{d}} \text {Gamma}\left (\frac {1}{2},\frac {2 i b (c+d x)}{d}\right )}{b}}{8 \sqrt {c+d x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 108, normalized size = 0.83
method | result | size |
derivativedivides | \(\frac {\sqrt {d x +c}+\frac {\sqrt {\pi }\, \left (\cos \left (\frac {2 d a -2 b c}{d}\right ) \FresnelC \left (\frac {2 b \sqrt {d x +c}}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )-\sin \left (\frac {2 d a -2 b c}{d}\right ) \mathrm {S}\left (\frac {2 b \sqrt {d x +c}}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )\right )}{2 \sqrt {\frac {b}{d}}}}{d}\) | \(108\) |
default | \(\frac {\sqrt {d x +c}+\frac {\sqrt {\pi }\, \left (\cos \left (\frac {2 d a -2 b c}{d}\right ) \FresnelC \left (\frac {2 b \sqrt {d x +c}}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )-\sin \left (\frac {2 d a -2 b c}{d}\right ) \mathrm {S}\left (\frac {2 b \sqrt {d x +c}}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )\right )}{2 \sqrt {\frac {b}{d}}}}{d}\) | \(108\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.52, size = 187, normalized size = 1.44 \begin {gather*} -\frac {\sqrt {2} {\left ({\left (\left (i - 1\right ) \cdot 4^{\frac {1}{4}} \sqrt {\pi } \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) + \left (i + 1\right ) \cdot 4^{\frac {1}{4}} \sqrt {\pi } \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right )\right )} \operatorname {erf}\left (\sqrt {d x + c} \sqrt {\frac {2 i \, b}{d}}\right ) + {\left (-\left (i + 1\right ) \cdot 4^{\frac {1}{4}} \sqrt {\pi } \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) - \left (i - 1\right ) \cdot 4^{\frac {1}{4}} \sqrt {\pi } \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right )\right )} \operatorname {erf}\left (\sqrt {d x + c} \sqrt {-\frac {2 i \, b}{d}}\right ) - \frac {8 \, \sqrt {2} \sqrt {d x + c} b}{d}\right )}}{16 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 114, normalized size = 0.88 \begin {gather*} \frac {\pi d \sqrt {\frac {b}{\pi d}} \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) \operatorname {C}\left (2 \, \sqrt {d x + c} \sqrt {\frac {b}{\pi d}}\right ) - \pi d \sqrt {\frac {b}{\pi d}} \operatorname {S}\left (2 \, \sqrt {d x + c} \sqrt {\frac {b}{\pi d}}\right ) \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) + 2 \, \sqrt {d x + c} b}{2 \, b d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos ^{2}{\left (a + b x \right )}}{\sqrt {c + d x}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 0.44, size = 165, normalized size = 1.27 \begin {gather*} -\frac {\frac {\sqrt {\pi } d \operatorname {erf}\left (-\frac {\sqrt {b d} \sqrt {d x + c} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (i \, b c - i \, a d\right )}}{d}\right )}}{\sqrt {b d} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}} + \frac {\sqrt {\pi } d \operatorname {erf}\left (-\frac {\sqrt {b d} \sqrt {d x + c} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (-i \, b c + i \, a d\right )}}{d}\right )}}{\sqrt {b d} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}} - 4 \, \sqrt {d x + c}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (a+b\,x\right )}^2}{\sqrt {c+d\,x}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________